package com.yn.pet.controller.pc.response;

import com.yn.common.core.domain.entity.SysDictData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class NoticeTypeResponse {


    @ApiModelProperty("公告类型key")
    private String key;

    @ApiModelProperty("公告类型value")
    private Integer value;


    public static NoticeTypeResponse transform(SysDictData sysDictData) {
        NoticeTypeResponse noticeTypeResponse = new NoticeTypeResponse();
        noticeTypeResponse.setValue(Integer.valueOf(sysDictData.getDictValue()));
        noticeTypeResponse.setKey(sysDictData.getDictLabel());
        return noticeTypeResponse;
    }
}
